const mongoose = require('mongoose')

// 设置属性类型
let SQSchema = new mongoose.Schema({
  title: { type: String, required: true },
  name: { type: String, default: '匿名' },
  Context: { type: String, required: true },
  NumberOfViewers: { type: Number, default: 0 },
  NumberOfLikes: { type: Number, default: 0 },
  type: {
    type: String,
    required: true
  },
  time: { type: Date, default: new Date() },
  isShow: { type: Boolean, default: true }
})
let SQModel = mongoose.model('contexts', SQSchema)

module.exports = SQModel